<?php

class OrderingForm extends CFormModel{
    public $street;
    public $city;
    public $state;
    public $zip;
    public $lat;
    public $lon;
    public $package_name;
    public $package_price;
    public $delivery;
    public $package_report_length;

    /**
     * Model rules
     * @return array
     */
    public function rules() {
        return array(
            array('street, city, state, zip','required','on'=>'CheckAddress'),
            array('delivery','numerical','integerOnly'=>true),
            array('street, city, state, package_name,package_report_length','length','max'=>50),
            array('zip','length','max'=>5),
            array('package_price','safe')
        );
    }
}